package main1.f_Model;

import main.f_ProtorypeModel.WorkExperience;

/**
 * Created by newtranx_011 on 2017/9/22.
 */
public class ResumeDeep implements Cloneable {

    private String name ;

    private WorkExperience workExperience;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public WorkExperience getWorkExperience() {
        return workExperience;
    }

    public void setWorkExperience(WorkExperience workExperience) {
        this.workExperience = workExperience;
    }

    public void show() {
        System.out.println("ResumeShallow{" +
                "name='" + name + '\'' +
                '}' + this.workExperience.toString());
    }

    /**
     * 浅拷贝
     */
    @Override
    public Object clone() throws CloneNotSupportedException {
        ResumeDeep resumeDeep =  (ResumeDeep) super.clone();
        resumeDeep.workExperience = (WorkExperience) workExperience.clone();
        return resumeDeep;
    }
}
